<!-- TempPlayVideo.html -->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<title>临时播放器</title>
	</head>
	<body>
		
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/jquery.min.js"></script>
	<script type="text/javascript">
		apiready = function() {
			setupScreenOrientation();
			setupNotifi();
			setupFrame();
		}
		//设置屏幕旋转方向
		function setupScreenOrientation(){
			if (api.deviceModel != 'iPhone X' && api.deviceModel != 'iPhone 10') {
				api.setScreenOrientation({
					orientation : 'landscape_left'
				});
			}
		}
		function setupNotifi(){
			api.addEventListener({
			    name: 'keyback'
			}, function(ret, err) {
			    api.setScreenOrientation({
					orientation : 'portrait_up'
				});
			    api.closeWin();
			});
		}
		function setupFrame(){
			var pageParam = api.pageParam;
			var url = "http://wxcenter.cfnet.org.cn/index.php/lesson/vod/index?cid="+pageParam.cid+"&vid="+pageParam.vid+"&uid="+$api.getStorage('cfnetppuid');
			api.openFrame({
			    name: 'TempVideoPlayer',
			    url: url,
			    rect: {
			        x: 0,
			        y: 0,
			        w: 'auto',
			        h: 'auto'
			    },
			    bounces: false
			});
			setTimeout(function(){
				api.openFrame({
				    name: 'BackSuspensionWindow',
				    url: '../StudyPlanManage/BackSuspensionWindow.html',
				    rect: {
				        x: 0,
				        y: 20,
				        w: 44,
				        h: 44
				    },
				    pageParam: {
				        closeWinName: 'TempPlayVideo'
				    },
				    bounces: false
				});
			}, 1000);
		}
	</script>
</html>